exports.init = function(app) {
  // 删除项目列表
  app.get("/net/schooladmin/school-payment-sku/del", function(req, res) {
    res.send({
      errcode: "0",
      errmsg: "ok"
    });
  });
  // 导出
  app.get("/net/schooladmin/school-payment-sku/export", function(req, res) {
    res.send({
      errcode: "0",
      errmsg: "ok"
    });
  });
  // 添加项目
  app.post("/net/schooladmin/school-payment-sku/create", function(req, res) {
    res.send({
      errcode: "0",
      errmsg: "ok",
      data: {
        id: 123
      }
    });
  });
  // 编辑项目
  app.post("/net/schooladmin/school-payment-sku/update", function(req, res) {
    res.send({
      errcode: "0",
      errmsg: "ok"
    });
  });
  // 班级列表
  app.get("/net/schooladmin/school-class/find-all-grade-class-list", function(req, res) {
    res.send({
      errcode: "0",
      errmsg: "ok",
      data: [
        {
          id: 2016,
          label: "2016级",
          children: [
            {
              id: 4,
              label: "class1"
            },
            {
              id: 5,
              label: "class2"
            }
          ]
        },
        {
          id: 2017,
          label: "2017级",
          children: [
            {
              id: 1,
              label: "一班"
            },
            {
              id: 2,
              label: "二班"
            },
            {
              id: 3,
              label: "class 3"
            }
          ]
        }
      ]
    });
  });
  // 项目详情
  app.get("/net/schooladmin/school-payment-sku/get", function(req, res) {
    res.send({
      errcode: "0",
      errmsg: "ok",
      data: {
        id: 127,
        merchantId: 1,
        schoolId: 1,
        name: "学杂费",
        info: "",
        amount: 100000,
        startTime: 1504919349,
        endTime: 1512781749,
        created: 1508399412,
        modified: 1508919584,
        deleted: 0,
        classList: [4],
        isInstallment: 1,
        skuTypeId: 1,
        skuTypeName: '学费',
        installmentNum: 5,
        isStartNotice: 1,
        isEndNotice: 1,
        endNoticeTime: 24,
        paymentSettingId: 1,
        paymentType: 2
      }
    });
  });
  // 项目列表
  app.post("/net/schooladmin/school-payment-sku/find", function(req, res) {
    res.send({
      errcode: "0",
      errmsg: "ok",
      data: [
        {
          id: 127,
          status: 2,
          merchantId: 1,
          schoolId: 1,
          name: "学杂费",
          info: "学杂费info",
          amount: 100000,
          shouldPay: 1000,
          startTime: 1504919349,
          endTime: 1512781749,
          created: 1508399412,
          modified: 1508399412,
          deleted: 0,
          gradeList: [],
          studentCount: 0,
          classCount: 0
        },
        {
          id: 128,
          status: 3,
          merchantId: 1,
          schoolId: 1,
          name: "学杂费2",
          info: "学杂费info",
          amount: 100000,
          shouldPay: 1000,
          startTime: 1504919349,
          endTime: 1512781749,
          created: 1508399632,
          modified: 1508399632,
          deleted: 0,
          gradeList: [2017],
          studentCount: 9,
          classCount: 1
        },
        {
          id: 131,
          status: 4,
          merchantId: 1,
          schoolId: 1,
          name: "书本费3u",
          info: "书本费info2",
          amount: 1000001,
          shouldPay: 1000,
          startTime: 1504919349,
          endTime: 1512781749,
          created: 1508399918,
          modified: 1508402426,
          deleted: 0,
          gradeList: [2017],
          studentCount: 21,
          classCount: 2
        },
        {
          id: 132,
          status: 5,
          merchantId: 1,
          schoolId: 1,
          name: "学杂费3",
          info: "学杂费info",
          amount: 100000,
          shouldPay: 1000,
          startTime: 1504919349,
          endTime: 1512781749,
          created: 1508485725,
          modified: 1508485725,
          deleted: 0,
          gradeList: [2017],
          studentCount: 21,
          classCount: 2
        }
      ],
      page: {
        currentPage: 1,
        currentCount: 20,
        totalCount: 4,
        totalPage: 1
      }
    });
  });
  // 项目统计
  app.get("/net/schooladmin/school-payment-sku/statistics-by-status", function(req, res) {
    res.send({
      errcode: "0",
      errmsg: "ok",
      data: {
        all: 12,
        unStart: 12,
        ing: 9,
        paused: 0,
        end: 3
      }
    });
  });
  // 暂停或者开启项目
  app.post("/net/schooladmin/school-payment-sku/pause", function(req, res) {
    res.send({
      errcode: "0",
      errmsg: "ok"
    });
  });
  app.post("/net/schooladmin/school-order/get-payment-list-by-class", function(req, res) {
    res.send({
      errcode: "0",
      errmsg: "ok",
      data: [
        {
          classId: 52,
          name: "星光中（1）班",
          studentNum: 6,
          shouldPay: 30,
          payed: 0,
          plan: "60.0000"
        },
        {
          classId: 58,
          name: "星光小（3）班",
          studentNum: 0,
          shouldPay: 0,
          payed: 0,
          plan: null
        },
        {
          classId: 59,
          name: "星光小（4）班",
          studentNum: 0,
          shouldPay: 0,
          payed: 25,
          plan: null
        },
        {
          classId: 68,
          name: "阳光2班",
          studentNum: 7,
          shouldPay: 35,
          payed: 13,
          plan: "0.3714"
        }
      ],
      page: {
        currentPage: 1,
        currentCount: 15,
        totalCount: 4,
        totalPage: 1
      }
    });
  });
  // 班级列表
  app.get("/net/schooladmin/school-order/get-student-list", function(req, res) {
    res.send({
      errcode: "0",
      errmsg: "ok",
      data: [
        {
          label: "2016级-1班",
          children: [
            {
              id: 11,
              cardNo: '513002199308157491',
              label: "王先杰1"
            },
            {
              id: 12,
              cardNo: '513002199308157492',
              label: "王先杰2"
            },
            {
              id: 13,
              cardNo: '513002199308157493',
              label: "王先杰3"
            },
          ]
        },
        {
          label: "2016级-2班",
          children: [
            {
              id: 14,
              cardNo: '513002199308157494',
              label: "王先杰4"
            },
            {
              id: 15,
              cardNo: '513002199308157495',
              label: "王先杰5"
            },
            {
              id: 16,
              cardNo: '513002199308157496',
              label: "王先杰6"
            },
            {
              id: 17,
              cardNo: '513002199308157494',
              label: "王先杰4"
            },
            {
              id: 18,
              cardNo: '513002199308157495',
              label: "王先杰5"
            },
            {
              id: 19,
              cardNo: '513002199308157496',
              label: "王先杰6"
            },
            {
              id: 20,
              cardNo: '513002199308157494',
              label: "王先杰4"
            },
            {
              id: 21,
              cardNo: '513002199308157495',
              label: "王先杰5"
            },
            {
              id: 22,
              cardNo: '513002199308157496',
              label: "王先杰6"
            },
            {
              id: 23,
              cardNo: '513002199308157494',
              label: "王先杰4"
            },
            {
              id: 24,
              cardNo: '513002199308157495',
              label: "王先杰5"
            },
            {
              id: 25,
              cardNo: '513002199308157496',
              label: "王先杰6"
            },
            {
              id: 26,
              cardNo: '513002199308157494',
              label: "王先杰4"
            },
            {
              id: 27,
              cardNo: '513002199308157495',
              label: "王先杰5"
            },
            {
              id: 28,
              cardNo: '513002199308157496',
              label: "王先杰6"
            },
            {
              id: 29,
              cardNo: '513002199308157494',
              label: "王先杰4"
            },
            {
              id: 30,
              cardNo: '513002199308157495',
              label: "王先杰5"
            },
            {
              id: 31,
              cardNo: '513002199308157496',
              label: "王先杰6"
            },
            {
              id: 32,
              cardNo: '513002199308157494',
              label: "王先杰4"
            },
            {
              id: 33,
              cardNo: '513002199308157495',
              label: "王先杰5"
            },
            {
              id: 34,
              cardNo: '513002199308157496',
              label: "王先杰6"
            },
            {
              id: 35,
              cardNo: '513002199308157494',
              label: "王先杰4"
            },
            {
              id: 36,
              cardNo: '513002199308157495',
              label: "王先杰5"
            },
            {
              id: 37,
              cardNo: '513002199308157496',
              label: "王先杰6"
            },
            {
              id: 38,
              cardNo: '513002199308157494',
              label: "王先杰4"
            },
            {
              id: 40,
              cardNo: '513002199308157495',
              label: "王先杰5"
            },
            {
              id: 41,
              cardNo: '513002199308157496',
              label: "王先杰6"
            },
            {
              id: 42,
              cardNo: '513002199308157494',
              label: "王先杰4"
            },
            {
              id: 43,
              cardNo: '513002199308157495',
              label: "王先杰5"
            },
            {
              id: 44,
              cardNo: '513002199308157496',
              label: "王先杰6"
            },
            {
              id: 45,
              cardNo: '513002199308157494',
              label: "王先杰4"
            },
            {
              id: 46,
              cardNo: '513002199308157495',
              label: "王先杰5"
            },
            {
              id: 47,
              cardNo: '513002199308157496',
              label: "王先杰6"
            },
            {
              id: 48,
              cardNo: '513002199308157494',
              label: "王先杰4"
            },
            {
              id: 49,
              cardNo: '513002199308157495',
              label: "王先杰5"
            },
            {
              id: 50,
              cardNo: '513002199308157496',
              label: "王先杰6"
            },
            {
              id: 51,
              cardNo: '513002199308157494',
              label: "王先杰4"
            },
            {
              id: 52,
              cardNo: '513002199308157495',
              label: "王先杰5"
            },
            {
              id: 53,
              cardNo: '513002199308157496',
              label: "王先杰6"
            },
            {
              id: 54,
              cardNo: '513002199308157494',
              label: "王先杰4"
            },
            {
              id: 55,
              cardNo: '513002199308157495',
              label: "王先杰5"
            },
            {
              id: 56,
              cardNo: '513002199308157496',
              label: "王先杰6"
            },
            {
              id: 57,
              cardNo: '513002199308157494',
              label: "王先杰4"
            },
            {
              id: 58,
              cardNo: '513002199308157495',
              label: "王先杰5"
            },
            {
              id: 59,
              cardNo: '513002199308157496',
              label: "王先杰6"
            },
            {
              id: 60,
              cardNo: '513002199308157494',
              label: "王先杰4"
            },
            {
              id: 70,
              cardNo: '513002199308157495',
              label: "王先杰5"
            },
            {
              id: 71,
              cardNo: '513002199308157496',
              label: "王先杰6"
            },
            {
              id: 72,
              cardNo: '513002199308157494',
              label: "王先杰4"
            },
            {
              id: 73,
              cardNo: '513002199308157495',
              label: "王先杰5"
            },
            {
              id: 74,
              cardNo: '513002199308157496',
              label: "王先杰6"
            },
            {
              id: 75,
              cardNo: '513002199308157494',
              label: "王先杰4"
            },
            {
              id: 76,
              cardNo: '513002199308157495',
              label: "王先杰5"
            },
            {
              id: 77,
              cardNo: '513002199308157496',
              label: "王先杰6"
            },
            {
              id: 78,
              cardNo: '513002199308157494',
              label: "王先杰4"
            },
            {
              id: 79,
              cardNo: '513002199308157495',
              label: "王先杰5"
            },
            {
              id: 80,
              cardNo: '513002199308157496',
              label: "王先杰6"
            },
            {
              id: 81,
              cardNo: '513002199308157494',
              label: "王先杰4"
            },
            {
              id: 82,
              cardNo: '513002199308157495',
              label: "王先杰5"
            },
            {
              id: 83,
              cardNo: '513002199308157496',
              label: "王先杰6"
            },
            {
              id: 84,
              cardNo: '513002199308157494',
              label: "王先杰4"
            },
            {
              id: 85,
              cardNo: '513002199308157495',
              label: "王先杰5"
            },
            {
              id: 86,
              cardNo: '513002199308157496',
              label: "王先杰6"
            },
            {
              id: 87,
              cardNo: '513002199308157494',
              label: "王先杰4"
            },
            {
              id: 88,
              cardNo: '513002199308157495',
              label: "王先杰5"
            },
            {
              id: 89,
              cardNo: '513002199308157496',
              label: "王先杰6"
            },
            {
              id: 90,
              cardNo: '513002199308157494',
              label: "王先杰4"
            },
            {
              id: 91,
              cardNo: '513002199308157495',
              label: "王先杰5"
            },
            {
              id: 92,
              cardNo: '513002199308157496',
              label: "王先杰6"
            },
            {
              id: 93,
              cardNo: '513002199308157494',
              label: "王先杰4"
            },
            {
              id: 94,
              cardNo: '513002199308157495',
              label: "王先杰5"
            },
            {
              id: 95,
              cardNo: '513002199308157496',
              label: "王先杰6"
            },
            {
              id: 96,
              cardNo: '513002199308157494',
              label: "王先杰4"
            },
            {
              id: 97,
              cardNo: '513002199308157495',
              label: "王先杰5"
            },
            {
              id: 98,
              cardNo: '513002199308157496',
              label: "王先杰6"
            },
            {
              id: 99,
              cardNo: '513002199308157494',
              label: "王先杰4"
            },
            {
              id: 100,
              cardNo: '513002199308157495',
              label: "王先杰5"
            },
            {
              id: 101,
              cardNo: '513002199308157496',
              label: "王先杰6"
            },
            {
              id: 102,
              cardNo: '513002199308157494',
              label: "王先杰4"
            },
            {
              id: 103,
              cardNo: '513002199308157495',
              label: "王先杰5"
            },
            {
              id: 104,
              cardNo: '513002199308157496',
              label: "王先杰6"
            },
            {
              id: 105,
              cardNo: '513002199308157494',
              label: "王先杰4"
            },
            {
              id: 106,
              cardNo: '513002199308157495',
              label: "王先杰5"
            },
            {
              id: 107,
              cardNo: '513002199308157496',
              label: "王先杰6"
            },
            {
              id: 108,
              cardNo: '513002199308157494',
              label: "王先杰4"
            },
            {
              id: 109,
              cardNo: '513002199308157495',
              label: "王先杰5"
            },
            {
              id: 110,
              cardNo: '513002199308157496',
              label: "王先杰6"
            },
            {
              id: 111,
              cardNo: '513002199308157494',
              label: "王先杰4"
            },
            {
              id: 112,
              cardNo: '513002199308157495',
              label: "王先杰5"
            },
            {
              id: 113,
              cardNo: '513002199308157496',
              label: "王先杰6"
            }
          ]
        },
      ]
    });
  });
  // 减免项目添加
  app.post("/net/schooladmin/school-discount/create", function(req, res) {
    res.send({
      errcode: "0",
      errmsg: "ok"
    });
  });
  // 减免项目更新优惠条件
  app.post("/net/schooladmin/school-discount/update", function(req, res) {
    res.send({
      errcode: "0",
      errmsg: "ok"
    });
  });
  // 减免项目删除
  app.post("/net/schooladmin/school-discount/delete", function(req, res) {
    res.send({
      errcode: "0",
      errmsg: "ok",
      data: 
        {
          succ: 1,
          del: 2
        }
    });
  });
  // 减免项目修改学生
  app.post("/net/schooladmin/school-discount/edit-student", function(req, res) {
    res.send({
      errcode: "0",
      errmsg: "ok",
      data: 
        {
          succ: 1,
          del: 2
        }
    });
  });
  // 根据项目id减免项目列表
  app.get("/net/schooladmin/school-discount/find-all-by-sku-id", function(req, res) {
    res.send({
      errcode: "0",
      errmsg: "ok",
      data: [
        {
          id: 1,
          reason: "政府补贴",
          num: 1000,
          show: 1,
          studentIds: [22, 23]
        },
        {
          id: 2,
          reason: "政府补贴",
          num: 1000,
          show: 2,
          studentIds: [10, 11, 12]
        },
        {
          id: 3,
          reason: "政府补贴",
          num: 1000,
          show: 1,
          studentIds: [12]
        },
        {
          id: 4,
          reason: "政府补贴",
          num: 1000,
          show: 1,
          studentIds: [31, 32, 33,34,35]
        }
      ],      
    });
  });
  // 根据discountid获取减免项目列表
  app.post("/net/schooladmin/school-discount/find-all", function(req, res) {
    res.send({
      errcode: "0",
      errmsg: "ok",
      data: [
        {
          id: 1,
          reason: "政府补贴",
          num: 1000,
          show: 1,
          studentIds: [22]
        },
        {
          id: 2,
          reason: "政府补贴",
          num: 1000,
          show: 2,
          studentIds: [10, 11, 12]
        },
        {
          id: 3,
          reason: "政府补贴",
          num: 1000,
          show: 1,
          studentIds: [12, 13, 30]
        },
        {
          id: 4,
          reason: "政府补贴",
          num: 1000,
          show: 1,
          studentIds: [31, 32, 33]
        }
      ],      
    });
  });

  // 自定义缴费价格更新
  app.post("/net/schooladmin/school-discount/update-student-amount", function(req, res) {
    res.send({
      errcode: "0",
      errmsg: "ok",
      data: 
        {
          succ: 1,
          del: 2
        }
    });
  });
  // 自定义缴费价格更新
  app.post("/net/schooladmin/school-discount/reset-student-amount", function(req, res) {
    res.send({
      errcode: "0",
      errmsg: "ok",
      data: 
        {
          succ: 1,
          del: 2
        }
    });
  });
};
